import request from '@/utils/request';
/**
 * @description 获取列表
 * @param {Object} data
 * {
 * pageSize: Number
 * pageNo: Number
 * ...
 * }
 */
export function getList(data) {
  return request({
    url: '/TenderRest/gettender',
    method: 'post',
    data
  });
}
/**
 * @description 获取收藏列表
 * @param {Object} data
 * {
 * shopId: String
 * pageSize: Number
 * pageNo: Number
 * }
 */
export function getCollectionList(data) {
  return request({
    url: '/TenderRest/getcollectionTender',
    method: 'post',
    data
  });
}
/**
 * @description 查看招标详情
 * @param {Object} data
 * { id: '' }
 */
export function getOnebyid(data) {
  return request({
    url: '/TenderRest/getOnebyid',
    method: 'post',
    data
  });
}
/**
 * @description 收藏招标
 * @param {Object} data
 * { tenderId: '', shopId: '' }
 */
export function collection(data) {
  return request({
    url: '/TenderRest/insert',
    method: 'post',
    data
  });
}
/**
 * @description 取消收藏招标
 * @param {Object} data
 * { id: '' }
 */
export function cancelCollection(data) {
  return request({
    url: '/TenderRest/delete',
    method: 'post',
    data
  });
}
/**
 * @description 查看招标分类
 * @param {Object} data
 */
export function getCategory() {
  return request({
    url: '/TenderRest/getTenderType',
    method: 'post'
  });
}
